<template>
 <div>
<p>{{msg}}</p>
<button @click="reverse()">逆转世界</button>
 </div>
</template>

<script>
 export default {
   name: 'App',
   data () {
     return {
      msg:'hello,world'
     }
   },
   methods:{
    reverse(){
      // 转化为数组，翻转数组，数组转成字符串
     this.msg = this.msg.split('').reverse().join('')
    }
   }
 }
</script>

<style scoped lang='less'>

</style>